<script setup lang="ts">
import { ref } from 'vue'
const loading = ref(false)
const count = ref(0)
const load = () => {
  setTimeout(() => {
    count.value++
    loading.value = false
  }, 2000)
}
</script>

<template>
  <div class="app-page">
    <van-pull-refresh v-model="loading" @refresh="load">
      <div class="box">刷新次数：{{ count }}</div>
    </van-pull-refresh>
  </div>
</template>

<style lang="scss" scoped>
.box {
  height: 100vh;
}
</style>
